﻿using System;
using System.Collections;
using System.Collections.Generic;
using LogSystem;
using Pathfinding;
using Pathfinding.RVO;
using UnityEngine;
using UnityEngine.Serialization;
using RootMotion.Dynamics;
using Yoozoo.Gameplay.City;
using Yoozoo.Gameplay.Liberty.Pool;
using Yoozoo.Mars.Got;

namespace Yoozoo.Gameplay.Liberty.AI
{
    // 靶子子部位
    public class HittableTargetPart : MonoBehaviour, IHittable
    {
        // 靶子
        public HittableTarget hittableTarget;
        // 是否头部
        public bool isHead;
        
        public void OnHit(AIEntity attackerEntity, int damageHp, AnimationState animationState, bool hitHard,int weaponId)
        {
            // Debug.Log($"HittableBottle {attackerEntity.data.uniqueId}");
            hittableTarget.OnHit(damageHp, isHead);
        }
        
        public void OnGunHitPoint(Vector3 position, Vector3 normal)
        {
            hittableTarget.OnGunHitPoint(position, normal);
        }
        
    }
}